<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
    <TargetFrameworks Condition="'$(NetCoreAppPrevious)' != ''">$(TargetFrameworks);$(NetCoreAppPrevious)-windows;$(NetCoreAppPrevious)</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <!-- Suppress CA2249: Consider using String.Contains instead of String.IndexOf to avoid ifdefs. -->
    <NoWarn>$(NoWarn);CA2249</NoWarn>
    <!-- Suppress SYSLIB0004: 'RuntimeHelpers.PrepareConstrainedRegions()' is obsolete to avoid ifdefs. -->
    <NoWarn>$(NoWarn);SYSLIB0004</NoWarn>
    <EnableAOTAnalyzer>false</EnableAOTAnalyzer>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
    <IsPackable>true</IsPackable>
    <PackageDescription>Provides a collection of classes for OLEDB.

Commonly Used Types:
System.Data.OleDb.OleDbCommand
System.Data.OleDb.OleDbCommandBuilder
System.Data.OleDb.OleDbConnection
System.Data.OleDb.OleDbDataAdapter
System.Data.OleDb.OleDbDataReader
System.Data.OleDb.OleDbParameter
System.Data.OleDb.OleDbParameterCollection
System.Data.OleDb.OleDbTransaction</PackageDescription>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_OleDb</GeneratePlatformNotSupportedAssemblyMessage>
    <NoWarn Condition="'$(GeneratePlatformNotSupportedAssemblyMessage)' != ''">$(NoWarn);CS0618</NoWarn>
  </PropertyGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
             Link="Common\Interop\Windows\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.GetUserDefaultLCID.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.GetUserDefaultLCID.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.GetCurrentProcessId.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.GetCurrentProcessId.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.LocalAlloc.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.LocalAlloc.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.LocalFree.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.LocalFree.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.Semaphore.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.Semaphore.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.WaitForSingleObject.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.WaitForSingleObject.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.WaitForMultipleObjects.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.WaitForMultipleObjects.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\OleAut32\Interop.SysAllocStringLen.cs"
             Link="Common\Interop\Windows\OleAut32\Interop.SysAllocStringLen.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\OleAut32\Interop.SetErrorInfo.cs"
             Link="Common\Interop\Windows\OleAut32\Interop.SetErrorInfo.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\OleAut32\Interop.SysFreeString.cs"
             Link="Common\Interop\Windows\OleAut32\Interop.SysFreeString.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\OleAut32\Interop.VariantClear.cs"
             Link="Common\Interop\Windows\OleAut32\Interop.VariantClear.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Ole32\Interop.CoTaskMemAlloc.cs"
             Link="Common\Interop\Windows\Ole32\Interop.CoTaskMemAlloc.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Ole32\Interop.PropVariantClear.cs"
             Link="Common\Interop\Windows\Ole32\Interop.PropVariantClear.cs" />
    <Compile Include="$(CommonPath)System\Data\Common\MultipartIdentifier.cs"
             Link="Common\System\Data\Common\MultipartIdentifier.cs" />
    <Compile Include="AdapterSwitches.cs" />
    <Compile Include="ColumnBinding.cs" />
    <Compile Include="DbBindings.cs" />
    <Compile Include="DbConnectionOptions.cs" />
    <Compile Include="DbConnectionStringCommon.cs" />
    <Compile Include="DbParameterHelper.cs" />
    <Compile Include="DbPropSet.cs" />
    <Compile Include="NativeMethods.cs" />
    <Compile Include="OleDb_Enum.cs" />
    <Compile Include="OleDb_Util.cs" />
    <Compile Include="OleDbCommand.cs" />
    <Compile Include="OleDbCommandBuilder.cs" />
    <Compile Include="OleDbConnection.cs" />
    <Compile Include="OleDbConnectionFactory.cs" />
    <Compile Include="OleDbConnectionInternal.cs" />
    <Compile Include="OleDbConnectionPoolGroupProviderInfo.cs" />
    <Compile Include="OleDbConnectionString.cs" />
    <Compile Include="OleDbConnectionStringBuilder.cs" />
    <Compile Include="OleDbDataAdapter.cs" />
    <Compile Include="OleDbDataReader.cs" />
    <Compile Include="OleDbEnumerator.cs" />
    <Compile Include="OleDbError.cs" />
    <Compile Include="OleDbErrorCollection.cs" />
    <Compile Include="OleDbException.cs" />
    <Compile Include="OleDbFactory.cs" />
    <Compile Include="OleDbHResult.cs" />
    <Compile Include="OleDbInfoMessageEvent.cs" />
    <Compile Include="OleDbInfoMessageEventHandler.cs" />
    <Compile Include="OleDbLiteral.cs" />
    <Compile Include="OleDbMetadataCollectionNames.cs" />
    <Compile Include="OleDbMetadataColumnNames.cs" />
    <Compile Include="OleDbMetaDataFactory.cs" />
    <Compile Include="OleDbParameter.cs" />
    <Compile Include="OleDbParameterCollection.cs" />
    <Compile Include="OleDbParameterCollectionHelper.cs" />
    <Compile Include="OleDbPropertySetGuid.cs" />
    <Compile Include="OleDbPropertyStatus.cs" />
    <Compile Include="OleDbReferenceCollection.cs" />
    <Compile Include="OleDbRowUpdatedEvent.cs" />
    <Compile Include="OleDbRowUpdatedEventHandler.cs" />
    <Compile Include="OleDbRowUpdatingEvent.cs" />
    <Compile Include="OleDbRowUpdatingEventHandler.cs" />
    <Compile Include="OleDbSchemaGuid.cs" />
    <Compile Include="OleDbStruct.cs" />
    <Compile Include="OleDbTransaction.cs" />
    <Compile Include="OleDbType.cs" />
    <Compile Include="OleDbWrapper.cs" />
    <Compile Include="PropertyIDSet.cs" />
    <Compile Include="PropertyInfoSet.cs" />
    <Compile Include="RowBinding.cs" />
    <Compile Include="SafeHandles.cs" />
    <Compile Include="SafeNativeMethods.cs" />
    <Compile Include="UnsafeNativeMethods.cs" />
    <Compile Include="System\Data\Common\AdapterUtil.cs" />
    <Compile Include="System\Data\Common\DataCommonEventSource.cs" />
    <Compile Include="System\Data\Common\DbConnectionPoolKey.cs" />
    <Compile Include="System\Data\Common\FieldNameLookup.cs" />
    <Compile Include="System\Data\Common\NameValuePair.cs" />
    <Compile Include="System\Data\Common\SR.cs" />
    <Compile Include="System\Data\ProviderBase\DbBuffer.cs" />
    <Compile Include="System\Data\ProviderBase\DbConnectionClosed.cs" />
    <Compile Include="System\Data\ProviderBase\DbConnectionFactory.cs" />
    <Compile Include="System\Data\ProviderBase\DbConnectionHelper.cs" />
    <Compile Include="System\Data\ProviderBase\DbConnectionInternal.cs" />
    <Compile Include="System\Data\ProviderBase\DbConnectionInternal.Shared.cs" />
    <Compile Include="System\Data\ProviderBase\DbConnectionPool.cs" />
    <Compile Include="System\Data\ProviderBase\DbConnectionPoolCounters.cs" />
    <Compile Include="System\Data\ProviderBase\DbConnectionPoolGroup.cs" />
    <Compile Include="System\Data\ProviderBase\DbConnectionPoolGroupProviderInfo.cs" />
    <Compile Include="System\Data\ProviderBase\DbConnectionPoolIdentity.cs" />
    <Compile Include="System\Data\ProviderBase\DbConnectionPoolOptions.cs" />
    <Compile Include="System\Data\ProviderBase\DbMetaDataFactory.cs" />
    <Compile Include="System\Data\ProviderBase\DbReferenceCollection.cs" />
    <Compile Include="System\Data\ProviderBase\WrappedIUnknown.cs" />
    <Compile Include="$(CommonPath)System\Obsoletions.cs"
             Link="Common\System\Obsoletions.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
    <Compile Include="UnsafeNativeMethods.COMWrappers.cs" />
    <Compile Include="OleDbComWrappers.cs" />
  </ItemGroup>

  <ItemGroup>
    <EmbeddedResource Include="Resources\System.Data.OleDb.OleDbMetaData.xml"
                      LogicalName="System.Data.OleDb.OleDbMetaData.xml" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
    <ProjectReference Include="$(LibrariesProjectRoot)System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj" />
    <ProjectReference Include="$(LibrariesProjectRoot)System.Diagnostics.PerformanceCounter\src\System.Diagnostics.PerformanceCounter.csproj" />
  </ItemGroup>

</Project>
